#include <iostream>
#include "Layer.h"

using namespace std;
using namespace JDL;

Layer::Layer()
{

}

Layer::~Layer()
{

}

void	Layer::Render(SDL_Surface *screen)
{
  map<string, Drawable*>::iterator	it;

  for (it = _objs.begin(); it != _objs.end(); it++)
    it->second->Render(screen);
}

void	Layer::AddObject(string name, Drawable *obj)
{
  _objs[name] = obj;
}

void	Layer::DelObject(string name)
{
  _objs.erase(name);
}
